#include "EndState.h"
#include "GameObjectSystem.h"
#include "score.h"

EndState::EndState(const ObjectId& stateId)
	:FSMState(stateId)
{

}

void EndState::onEnter()
{
	Score* p1Score = static_cast<Score*>(GameObjectSystem::GetSingleton().editProperty(Score::SCORE_ID, "bump1"));
	Score* p2Score = static_cast<Score*>(GameObjectSystem::GetSingleton().editProperty(Score::SCORE_ID, "bump2"));
	
	LOG(INFO) << "Game over.";
	LOG(INFO) << "Final score: P1 -> " << p1Score->getScore() << " | P2 -> " << p2Score->getScore() << ".";
	LOG(INFO) << "Press R to restart.";

	GameObjectSystem::GetSingleton().setPause(true);
}